

cc.Class({
    extends: cc.Component,
    properties: {
        speed:1,
        startPanel:{
            default:null,
            type:cc.Node,
        },
        gamePanel:{
            default:null,
            type:cc.Node,
        },
        overPanel:{
            default:null,
            type:cc.Node,
        },
    },

    onLoad () {
        this.startPanel.active = true;
        this.gamePanel.active = false;
        this.overPanel.active = false;
        this.startPanel.getComponent('Start').panelManager = this;
        this.gamePanel.getComponent('Game').panelManager = this;
        this.overPanel.getComponent('Over').panelManager = this;
    },

    setStartpanel(isShow){
        this.startPanel.active = isShow;
    },
    setGamepanel(isShow){
        this.gamePanel.active = isShow;
    },
    setOverpanel(isShow){
        this.overPanel.active = isShow;
    },
});